//
//  CLLComposeButton.swift
//  CLWeiNo
//
//  Created by DDC on 2017/10/19.
//  Copyright © 2017年 DDC. All rights reserved.
//

import UIKit

class CLLComposeButton: UIControl {

    // 按钮的图标
    @IBOutlet weak var imageView: UIImageView!
    // 按钮的文字
    @IBOutlet weak var title: UILabel!
    // 按钮包含控制器的名称字段
    var clsName:String?
    // 创建按钮的方法
    class func createComposeViewButton(imageName:String,title:String)-> CLLComposeButton{
        
        // 从XIB 加载
        let nib = UINib(nibName: "CLLComposeButton", bundle: nil)
        let composeButton = nib.instantiate(withOwner: nil, options: nil)[0] as! CLLComposeButton
        
        // 设置属性
        composeButton.imageView.image = UIImage(named: imageName)
        composeButton.title.text = title
        
        
        // 返回
        return composeButton
        
    }
    

}
